Option Explicit
Sub Q_Sample031()
    ']wޥζMicrosoft Shell Controls And Automation
    Dim mySh     As Shell32.Shell
    Dim myFd     As Shell32.Folder
    Dim myFdItm  As Shell32.FolderItem
    Dim myFdItm2 As Shell32.FolderItem
    Dim i        As Long
    Set mySh = CreateObject("Shell.Application")
    'wڪ̷RƧ]SƧ`ơ^
    Set myFd = mySh.NameSpace(ssfFAVORITES)
    Cells.Delete
    i = 0
    For Each myFdItm In myFd.Items
        'ڪ̷RƧUҦɮרӰ
        If myFdItm.IsLink Then
            i = i + 1
            Cells(i, 1).Value = myFdItm.Name
            Cells(i, 3).Value = myFdItm.GetLink.Path
        Else
            i = i + 1
            Cells(i, 1).Value = myFdItm.Name
            Cells(i, 2).Value = "Ƨ"
            For Each myFdItm2 In myFdItm.GetFolder.Items
                i = i + 1
                Cells(i, 2).Value = myFdItm2.Name
                Cells(i, 3).Value = myFdItm2.GetLink.Path
            Next
        End If
    Next
    Set mySh = Nothing						'
End Sub
